package com.wt.service;

import com.wt.pojo.UserInfo;
import com.wt.service.hystrix.UserServiceHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(value = "MYPROVIDER",path = "user",fallback = UserServiceHystrix.class)
public interface UserService {

    @PostMapping
    public String Add(UserInfo userInfo);

    @DeleteMapping("/{id}")
    public String del(@PathVariable("id") Integer id);

    @GetMapping
    public String get(UserInfo userInfo);

}
